import request from "@/utils/http";

// 组合列表
export async function getPortfolioList(params?: any): Promise<any> {
  return request(`/api/fund/portfolio/page/fof_portfolio`, {
    method: "POST",
    data: params,
  });
}

// 新增组合获取业绩基准列表
export async function getBenchMarkList(params?: any): Promise<any> {
  return request(`/api/fund/benchmark/portfolio/query`, {
    method: "POST",
    data: params,
  });
}

// 提交上传文件
export async function commitPosition(params?: any): Promise<any> {
  return request(`/api/fund/portfolio/commit/fof_portfolio`, {
    method: "POST",
    data: params,
  });
}

// 删除组合
export async function deletePortfolio(params?: any): Promise<any> {
  return request(`/api/fund/portfolio/delete/fof_portfolio`, {
    method: "POST",
    data: params,
  });
}

// 新增组合
export async function createPortfolio(params?: any): Promise<any> {
  return request(`/api/fund/portfolio/create/fof_portfolio`, {
    method: "POST",
    data: params,
  });
}

// 编辑组合
export async function updatePortfolio(params?: any): Promise<any> {
  return request(`/api/fund/portfolio/update/fof_portfolio`, {
    method: "POST",
    data: params,
  });
}

// 更新数据
export async function calculatePortfolio(params?: any): Promise<any> {
  return request(`/api/fund/portfolio/calculate/fof_portfolio`, {
    method: "POST",
    data: params,
  });
}

// 判断组合是否在执行任务
export async function isPortfolioRunning(params?: any): Promise<any> {
  return request(`/api/fund/portfolio/check/fof_portfolio`, {
    method: "POST",
    data: params,
  });
}

